package hu;

import java.util.*;

public class hu59 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        hurry:for (int i = 0; i < ch.length; i++) {
            for (int j = 0; j < ch.length; j++) {
                if(i != j && ch[i] == ch[j])
                    continue hurry;
            }
            System.out.println(ch[i]);
            return;
        }
        System.out.println(-1);
    }
}
